Global Index
HTML5 JS API Index > DOM Tutorials & Specs

HTMLDialogElement

Extends HTMLElement.

The dialog element represents a part of an application that a user interacts with to perform a task, for example a dialog box, inspector, or window.

Properties
boolean
open
The open IDL attribute must reflect the open content attribute.
DOMString
returnValue
The returnValue IDL attribute, on getting, must return the last value to which it was set. On setting, it must be set to the new value. When the element is created, it must be set to the empty string.
Operations
void
close(optional DOMString returnValue)
When the close() method is invoked, the user agent must close the dialog that the method was invoked on. If the method was invoked with an argument, that argument must be used as the return value; otherwise, there is no return value.
voidshow(optional (MouseEvent or Element) anchor)
voidshowModal(optional (MouseEvent or Element) anchor)